﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/jsp/system/admin/header.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <meta charset="utf-8">
    <title>贷款合同</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="../../../../static/layer/css/layui.css"/>
    <link rel="stylesheet" href="../../../../static/okadmin/css/okadmin.css">
    <link rel="stylesheet" href="../../../../static/okadmin/nprogress/nprogress.css">
</head>

<style>
    .sysMessage{
        color: #fff;
        min-width: 8px;
        height: 18px;
        line-height: 18px;
        padding: 0 5px;
        text-align: center;
        border-radius: 9px;
        background-color: red;
    }

    .class_right_px dd >a{
        margin-left: 18px;
    }

    .add_buss{
        color: #fff;
        /*min-width: 8px;*/
        height: 20px;
        line-height: 20px;
        padding: 0 5px;
        text-align: center;
        border-radius: 6px;
        background-color: #36ABA1;
    }



</style>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!--头部导航-->
    <div class="layui-header">
        <div class="layui-logo">贷款辅助平台管理系统</div>
        <div class="menu-switch">
            <i class="layui-icon">&#xe65a;</i>
        </div>
        <ul class="layui-nav layui-layout-left AUTH-MENU_SPCD">
            <li class="layui-nav-item class_shenpi"><dd><a href="javascript:;" path="../../../../webhtml/loan/loan_shenpiList.html" tab-id="10-1"><i class="layui-icon">&#xe6b2;</i>&nbsp;&nbsp;审批事项<span class="layui-badge msgnum">0</span></a></dd></li>
        </ul>


        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
               <span id="message"><div style="cursor:pointer;"><i class="fa fa-bell-o" aria-hidden="true" ></i>提醒<span
                       class="layui-badge-xx sysMessage">0</span>
                   <span id="fhsmsobjsys"></span>
                <dl class="layui-nav-child skin">
                </dl>
                </div>
                   </span>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <%--<img src="images/head.jpg" class="layui-nav-img">--%>
                    ${user.NAME}
                </a>
                <dl class="layui-nav-child">
                    <%-- <dd><a href="./webhtml/admin/index.html?type=0">消息通知</a></dd>--%>
                    <dd class="AUTH-MENU_YHGL"><a href="./webhtml/admin/index.html?type=1">用户管理</a></dd>
                    <dd><a href="./webhtml/admin/index.html?type=2">账户设置</a></dd>
                   <%-- <dd class="AUTH-MENU_FSGG"><a href="./webhtml/admin/index.html?type=3">发送公告</a></dd>--%>
                   <%-- <dd class="AUTH-MENU_JCSZ"><a href="./webhtml/admin/index.html?type=7">行业配置</a></dd>--%>
                    <dd class="AUTH-MENU_JSSZ"><a href="./webhtml/admin/index.html?type=9">角色设置</a></dd>
                    <dd class="AUTH-MENU_HTMB"><a href="./webhtml/admin/index.html?type=11">模板管理</a></dd>
                    <dd class="AUTH-MENU_JSSZ"><a href="./webhtml/admin/index.html?type=12">操作记录</a></dd>
                    <%--<dd><a href="/main/index&sid=1">后台管理</a></dd>--%>
                    <dd><a href="logout">退出登录</a></dd>
                </dl>
            </li>
            <%--<li class="layui-nav-item lockcms"><a href="javascript:void(0)" id="">锁屏</a></li>--%>
            <li class="layui-nav-item"><a href="javascript:void(0)" id="logout">退出</a></li>
            <li class="layui-nav-item addContract AUTH-MENU_YWQX_XZ "><a href="javascript:void(0);"  onclick="toContractAdd()"><%--<i
                    class="layui-icon">&#xe654;</i>--%><span class="add_buss">新建业务</span></a></li>
        </ul>
    </div>
    <!--左侧导航区域-->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" lay-shrink="all" lay-filter="">
                <li class="layui-nav-item layui-nav-itemed AUTH-MENU_YWQX">
                    <a class="" href="javascript:;">
                        <i class="layui-icon">&#xe62c;</i> 业务管理
                    </a>
                    <dl class="layui-nav-child class_right_px">
                        <dd><a href="javascript:;" path="../../../../webhtml/loan/loan_bussiness.html" tab-id="1-1" >审批中业务</a>
                        </dd>
                        <dd><a href="javascript:;" path="../../../../webhtml/loan/loan_bussiness_yes.html" tab-id="1-2">已完成业务</a></dd>
                        <dd><a href="javascript:;" path="../../../../webhtml/loan/loan_bussiness_invalid.html" tab-id="1-3">已作废业务</a></dd>
                        <dd><a href="javascript:;" path="../../../../webhtml/loan/loan_bussiness_zancun.html" tab-id="1-4">暂存中业务</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed AUTH-MENU_HTQX">
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe62a;</i> 合同管理
                    </a>
                    <dl class="layui-nav-child class_right_px">
                        <dd><a href="javascript:;" path="../../../../webhtml/loan/loan_ing.html" tab-id="2-1">履约中</a></dd>
                        <dd><a href="javascript:;" path="../../../../webhtml/loan/loan_end.html" tab-id="2-2">终止后</a></dd>
                        <%--<dd><a href="javascript:;" path="../../../../webhtml/loan/loan_will.html" tab-id="2-3">将到期</a></dd>--%>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed AUTH-MENU_CWQX" >
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe646;</i> 还款管理
                    </a>
                    <dl class="layui-nav-child class_right_px">
                        <dd><a href="javascript:;" path="/webhtml/admin/financial/receivable.html"  class="AUTH-CWQX_CK" tab-id="3-1">应收</a></dd>
                        <dd><a href="javascript:;" path="/webhtml/admin/financial/alreadReceived.html"   class="AUTH-CWQX_CK" tab-id="3-2">已收</a></dd>
                        <dd><a href="javascript:;" path="/webhtml/admin/financial/beOverdue.html"  class="AUTH-CWQX_CK"   tab-id="3-3">待放款</a></dd>
                        <dd><a href="javascript:;" path="/webhtml/admin/financial/pendingMoney.html"  class="AUTH-CWQX_CK"  tab-id="3-4">逾期</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed AUTH-MENU_JKR" >
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe613;</i> 借款方管理
                    </a>
                    <dl class="layui-nav-child class_right_px">
                        <dd><a href="javascript:;" path="/webhtml/admin/financial/borrower.html" tab-id="4-1">借款方管理</a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed AUTH-MENU_SJTJ  class_right_px" >
                    <a href="javascript:;">
                        <i class="layui-icon">&#xe647;</i> 数据统计
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" path="/webhtml/admin/statisticalAnalysis/repaymentAnalysis.html" tab-id="5-1">还款分析</a></dd>
                        <dd><a href="javascript:;" path="/webhtml/admin/statisticalAnalysis/businessAnalysis.html" tab-id="5-2">业务分析</a></dd>

                    </dl>
                </li>
            </ul>
        </div>
    </div>
    <!-- 内容主体区域 -->
    <div class="content-body">
        <div class="layui-tab layui-tab-brief" lay-filter="ok-tab" lay-allowClose="true">
            <ul class="layui-tab-title">
                <li class="layui-this"><i class="layui-icon">&#xe68e;</i>主页</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe src='../../../../webhtml/loan/welcome.html' frameborder="0" scrolling="yes" width="100%"
                            height="100%"></iframe>
                </div>
            </div>
        </div>
    </div>
    <!--底部信息-->
    <div class="layui-footer">
        2018 © dkfz.com
    </div>
</div>
<div class="yy"></div>
<!--js逻辑-->
<script type="text/javascript" src="../../../../static/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../../../static/layer/layui.js"></script>
<script type="text/javascript" src="../../../../static/js/common/authUtils.js"></script>
<script src="../../../../static/okadmin/nprogress/nprogress.js"></script>
<script src="../../../../static/okadmin/okadmin.js"></script>
<script>
    xiaoxi();
    //打开新增合同的页面
    function toContractAdd() {
        layer.open({
            type: 2,    //弹出类型
            title: '新建贷款业务',   //标题
            closeBtn: 1,    //显示关闭按钮
            shade: [0.3],   //遮罩透明度
            area: ['1000px', '90%'],  //打开窗口的宽高
            time: 0,    //几秒后自动关闭，默认0时不关闭
            anim: 1,    //动画效果
            resize: false,  //设置成不允许拉伸
            content: '../../../webhtml/loan/loan_add.html'  //iframe的url
        });
        $(this).blur(); //移除焦点，防止点击回车按钮造成多次打开
    }
    var init={
        //加载代办事项数
        initMSG:function () {
            $.ajax({
                url: "/LoanController/initmsg",
                data: {},
                dataType: "json",
                type: "post",
                async: false,
                success: function (res) {
                    if (res.errcode === "0") {
                        res.data&&$(".msgnum").html(res.data.length);
                    } else if (res.errcode === "1") {
                    }
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    console.error(XMLHttpRequest.status);
                    console.error(XMLHttpRequest.readyState);
                    console.error(textStatus);
                }
            });
        }
    }
    init.initMSG();

    layui.use(['jquery', 'table', 'form', 'layer', 'element', 'laydate', 'upload'], function () {
        table = layui.table;
        var $ = layui.jquery,
            element = layui.element, //导航的hover效果、二级菜单等功能，需要依赖element模块
            form = layui.form,
            upload = layui.upload,
            laydate = layui.laydate;


        //消息
        $("#message").click(function () {
            var index = layer.open({
                //maxmin: true,
                zIndex: 1002,
                //offset: 'b',
                type: 2,    //弹出类型
                shadeClose: true,
                title: '消息',   //标题
                closeBtn: 1,    //显示关闭按钮
                shade: [0.3],   //遮罩透明度
                area: ['768px', '90%'],  //打开窗口的宽高
                time: 0,    //几秒后自动关闭，默认0时不关闭
                anim: 2,    //动画效果
                resize: false,  //设置成不允许拉伸
                content: '../../webhtml/message/message.html'  //iframe的url
            });
        });

    })

    function xiaoxi() {
        //消息列表查询
        $.ajax({
            url: "/financial/findAllMessage",
            dataType: "json",
            type: "post",
            async: false,
            success: function (res) {
                debugger
                var length =  res.data.length;
                $(".sysMessage").html(length); //  j


            }
        });
    };

    $("a").click(function(){
        debugger
        var tab_val = $(this).attr("tab-id");
        if(tab_val=="10-1"){
            $("dd").attr("class","");
        }else{
            $(".class_shenpi").attr("class","layui-nav-item  class_shenpi");
        }
    });
</script>
</body>
</html>